<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="./vue.js"></script>
	</head>
	<body>
		<div id="app">
			<input type="text" @keyup.enter="keyenter" v-model="msg"/>
			<input type="text" @keyup.a="a" v-model="mag"/>
		</div>
		<script type="text/javascript">
			var vm = new Vue({
				el:"#app",
				data:{
					msg:"",
					mag:""
					
				},
				methods:{
					keyenter(){
						alert("当前按的是enter键")
					},
					a(){
						alert("当前按键a")
					}
				}
			})
		</script>
	</body>
</html>
